/**
 * 版权所有（c）2021. 上海海鼎信息工程股份有限公司，保留所有权利
 */
package com.lovely602.design.structure.proxy.quiescent.demo;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.io.IOException;
import java.io.InputStream;

/**
 * 真实主题：上饶特产
 *
 * @author lizhixing
 */
public class SrSpecialty extends JFrame implements Specialty {

  public SrSpecialty() {
    super("上海代理上饶特产测试");
    this.setLayout(new GridLayout(1, 1));

    try {
      InputStream is = ClassLoader.getSystemResourceAsStream("image/SrSpecialty.jpg");
      Image image = ImageIO.read(is);
      JLabel l1 = new JLabel(new ImageIcon(image));
      this.add(l1);
      this.pack();
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    } catch (IOException e) {
      e.printStackTrace();
    }

  }

  @Override
  public void display() {
    this.setVisible(true);
  }
}
